<extend name="Common@Layout:hui-admin" />
<block name="title"><title>编辑权限</title></block>
<block name="style">
</block>

<block name="main">
<div class="pd-20">
	<form action="{:U('Authadmin/edit_post')}" method="post" class="form form-horizontal validator_form">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>父节点：</label>
			<div class="formControls col-6">
				<select name="parentid" class="input-text" style="width:auto;">
					<option value="0">根节点</option>
					{$select_categorys}
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>链接名称：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" value="{$info.title}" placeholder="" name="title" data-rule="链接名称:required;">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>权限链接：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" name="name" value="{$info.name}" placeholder=""  data-rule="权限链接:required;">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">条件：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" value="{$info.condition}" placeholder="" name="condition">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2">iconfont图标：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" value="{$info.iconfont}" placeholder="" name="iconfont">
			</div>
			<div class="col-2"><a href="http://www.h-ui.net/Hui-3.7-Hui-iconfont.shtml" class="c-red" target="_blank">图标挑选地址</a></div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>是否显示：</label>
			<div class="formControls col-6">
				<php>if(!isset($info['status'])) $info['status'] = 1;</php>
				<div class="radio-box">
				    <label><input type="radio" name="status" value="1" <eq name="info['status']" value="1">checked</eq>> 显示</label>
				</div>
				<div class="radio-box">
				    <label><input type="radio" name="status" value="0" <eq name="info['status']" value="0">checked</eq>> 隐藏</label>
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-4">
				<input type="text" class="input-text" value="{$info.listorder|default=0}" placeholder="" name="listorder" data-rule="排序值:required;">
			</div>
		</div>
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<input type="hidden" name="id" value="{$info.id}">
				<input type="hidden" name="group" value="{$_SESSION['auth_group']}">
				<button type="submit" style="width:200px;" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
	</form>
</div>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-user-add").Validform({
		tiptype:2,
		callback:function(form){
			form[0].submit();
			var index = parent.layer.getFrameIndex(window.name);
			parent.$('.btn-refresh').click();
			parent.layer.close(index);
		}
	});

});
parent.shuaxin_nodes();
</script>
</block>